Skip to content

Rewrite for Zen 1.21+ settings redesign (moz-page-nav) - #1

Closed
nordstern wants to merge 1 commit into
Vertex-Mods:mainfrom
nordstern:fix/zen-1.21-moz-page-nav
Closed

Rewrite for Zen 1.21+ settings redesign (moz-page-nav)#1
nordstern wants to merge 1 commit into
Vertex-Mods:mainfrom
nordstern:fix/zen-1.21-moz-page-nav

Conversation

@nordstern

Copy link
Copy Markdown

Problem

The Firefox settings redesign shipped in Zen 1.21 replaced the about:preferences sidebar markup (vbox.navigation, richlist #categories, sidebar-footer-list) with the shadow-DOM <moz-page-nav> component. None of the mod's selectors match anymore, so the mod has no effect on the settings page (current store version included).

Changes

preferences.css

  • Targets the moz-page-nav host (#categories). The component exports no CSS parts, so shadow internals are styled indirectly: labels stay rendered and the host width does the collapsing (clipped by overflow: hidden), keeping row heights identical in both states.
    • Traps documented in comments: font-size: 0 compresses rows (label line box is taller than the icon, list crawls during the animation) and color: transparent kills the icons (fills ride currentColor).
  • Collapsed strip stays wider than the heading row's natural width so the logo never flex-shrinks (its centered background otherwise drifts sideways between states). The label sliver past the icons is hidden with a mask-image fade; the heading is hidden via --font-size-xlarge (custom properties inherit across the shadow boundary but can't be transitioned from outside).
  • Expands on :hover only — :focus-within pins the flyout open after a category is clicked, and the component doesn't delegate focus, so keyboard-only detection can't cross the shadow boundary.

addons.css

  • Sidebar rebuilt to match the settings treatment. about:addons markup is unchanged, but .category is a light-DOM button whose label is its text and whose icon is a background-image with fill: currentColor — labels hide with color: transparent while the fill is pinned to a concrete color: solid icons, real label fade. Selected state split: icon accent in both states, label accent on hover.
  • Footer (settings/support links) aligned to the same icon column, labels fade via opacity. Header divider slimmed from 4px to 1px.
  • Flat selector topology: deeply nested &-rules inside @-moz-document silently failed to apply in the user-sheet context.

userContent.css

  • Shared design tokens (--cs-strip-w, --cs-flyout-w, --cs-content-offset, --cs-anim, --cs-elevation, --cs-accent) keep both sidebars in sync; each file carries literal fallbacks and still works standalone. prefers-reduced-motion zeroes --cs-anim in one place.

Result

Both pages: 54px collapsed icon strip, 250px hover flyout, 180ms decelerate curve, elevation shadow on the expanded flyout. All four existing mod preferences keep working (enable, animations, compact addons, grid).

Tested on Zen 1.21.7b (macOS, Sine).

The Firefox settings redesign shipped in Zen 1.21 replaced the
about:preferences sidebar markup (vbox.navigation, richlist #categories,
sidebar-footer-list) with the shadow-DOM <moz-page-nav> component, so
none of the previous selectors matched and the mod had no effect on the
settings page.

preferences.css:
- Target the moz-page-nav host (#categories). It exports no CSS parts,
  so shadow internals are styled indirectly: labels stay rendered and
  the host width does the collapsing (clipped by overflow: hidden),
  keeping row heights identical in both states. font-size: 0 compresses
  rows and color: transparent kills the icons (fills ride currentColor);
  both traps are documented in comments.
- Collapsed strip stays wider than the heading row's natural width so
  the logo never flex-shrinks (its centered background otherwise drifts
  between states). The label sliver past the icons is hidden with a
  mask-image fade; the heading is hidden via --font-size-xlarge (custom
  properties inherit across the shadow boundary but cannot be
  transitioned from outside).
- Expand on :hover only: :focus-within pins the flyout open after a
  category is clicked, and the component does not delegate focus, so
  keyboard-only detection cannot cross the shadow boundary.

addons.css:
- Sidebar rebuilt to match the settings treatment. about:addons markup
  is unchanged, but .category is a light-DOM button whose label is its
  text and whose icon is a background-image with fill: currentColor -
  labels are hidden with color: transparent while the fill is pinned to
  a concrete color, giving labels a real fade with solid icons.
  Selected split by state: icon accent always, label accent on hover.
- Footer (settings/support links) aligned to the same icon column with
  labels fading via opacity; header divider slimmed from 4px to 1px.
- Flat selector topology: deeply nested &-rules inside @-moz-document
  silently failed to apply in the user-sheet context.

userContent.css:
- Shared design tokens (--cs-strip-w, --cs-flyout-w, --cs-content-offset,
  --cs-anim, --cs-elevation, --cs-accent) so both sidebars stay in sync;
  each file keeps literal fallbacks and works standalone.
  prefers-reduced-motion zeroes --cs-anim in one place.

Both pages: 54px collapsed strip, 250px hover flyout, 180ms decelerate
curve, elevation shadow on the expanded flyout.
@github-actions

Copy link
Copy Markdown

⚠️ Pull Requests Are Not Accepted Here

Thank you for your interest in contributing! However, this repository is automatically maintained and synchronized from the main repository.

🔗 Please contribute to the main repository instead:

Main Repository: BibekBhusal0/zen-custom-js/compact-settings

📝 How to Contribute:

  1. Fork the main repository: https://github.com/BibekBhusal0/zen-custom-js
  2. Make your changes in the compact-settings directory
  3. Open a pull request in the main repository

For detailed contribution guidelines, see CONTRIBUTING.md.


This pull request will be automatically closed. Thank you for understanding! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant